using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Analysis
{
    /// <summary>
    /// <para>Color Coded Layer</para>
    /// <para>Creates a multigeography-level, scale-dependent choropleth layer from a variable describing a business, demographic, consumer, or landscape characteristic.</para>
    /// <para>根据描述业务、人口统计、消费者或景观特征的变量创建多地理位置级别、与比例相关的分区统计线图层。</para>
    /// </summary>    
    [DisplayName("Color Coded Layer")]
    public class ColorCodedLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ColorCodedLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_classification_variable">
        /// <para>Classification Variable</para>
        /// <para>A variable that will display as a color-coded map.</para>
        /// <para>将显示为颜色编码地图的变量。</para>
        /// </param>
        /// <param name="_out_layer_name">
        /// <para>Output Layer Name</para>
        /// <para>The name of the color-coded layer that will be added to the map.</para>
        /// <para>将添加到地图中的颜色编码图层的名称。</para>
        /// </param>
        /// <param name="_classification_method">
        /// <para>Classification Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the method that will be used to calculate the class breaks.</para>
        ///   <bulletList>
        ///     <bullet_item>Natural Breaks (Jenks)—Natural breaks classes are based on natural groupings inherent in the data. Class breaks that best group similar values and that maximize the differences between classes will be identified. This is the default.</bullet_item><para/>
        ///     <bullet_item>Quantile—Each class will contain an equal number of features. A quantile classification is well suited to linearly distributed data.</bullet_item><para/>
        ///     <bullet_item>Equal Interval—The range of attribute values will be divided into equal-sized subranges. This allows you to specify the number of intervals, and ArcGIS Pro will automatically determine the class breaks based on the value range.</bullet_item><para/>
        ///     <bullet_item>Geometric Interval—Class breaks will be created based on class intervals that have a geometric series. The geometric coefficient in this classifier can change once (to its inverse) to optimize the class ranges.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于计算类间隔的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>自然间歇 （Jenks） - 自然间歇类基于数据中固有的自然分组。将确定最好地对相似值进行分组并最大化类之间差异的类间隔。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>分位数—每个类将包含相同数量的要素。分位数分类非常适合线性分布数据。</bullet_item><para/>
        ///     <bullet_item>相等间隔—属性值的范围将划分为大小相等的子范围。这允许您指定间隔数，ArcGIS Pro 将根据值范围自动确定分班符。</bullet_item><para/>
        ///     <bullet_item>几何间隔—将基于具有几何序列的类间隔创建类间隔。此分类器中的几何系数可以更改一次（与其倒数相反）以优化类范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_number_of_classes">
        /// <para>Number of Classes</para>
        /// <para>The number of data classification breaks that will appear on the map. The default value is 5.</para>
        /// <para>将显示在地图上的数据分类中断数。默认值为 5。</para>
        /// </param>
        public ColorCodedLayer(object _classification_variable, object _out_layer_name, _classification_method_value _classification_method, object _number_of_classes)
        {
            this._classification_variable = _classification_variable;
            this._out_layer_name = _out_layer_name;
            this._classification_method = _classification_method;
            this._number_of_classes = _number_of_classes;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Color Coded Layer";

        public override string CallName => "ba.ColorCodedLayer";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_classification_variable, _out_layer_name, _classification_method.GetGPValue(), _number_of_classes, _out_layer];

        /// <summary>
        /// <para>Classification Variable</para>
        /// <para>A variable that will display as a color-coded map.</para>
        /// <para>将显示为颜色编码地图的变量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Classification Variable")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _classification_variable { get; set; }


        /// <summary>
        /// <para>Output Layer Name</para>
        /// <para>The name of the color-coded layer that will be added to the map.</para>
        /// <para>将添加到地图中的颜色编码图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_layer_name { get; set; }


        /// <summary>
        /// <para>Classification Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the method that will be used to calculate the class breaks.</para>
        ///   <bulletList>
        ///     <bullet_item>Natural Breaks (Jenks)—Natural breaks classes are based on natural groupings inherent in the data. Class breaks that best group similar values and that maximize the differences between classes will be identified. This is the default.</bullet_item><para/>
        ///     <bullet_item>Quantile—Each class will contain an equal number of features. A quantile classification is well suited to linearly distributed data.</bullet_item><para/>
        ///     <bullet_item>Equal Interval—The range of attribute values will be divided into equal-sized subranges. This allows you to specify the number of intervals, and ArcGIS Pro will automatically determine the class breaks based on the value range.</bullet_item><para/>
        ///     <bullet_item>Geometric Interval—Class breaks will be created based on class intervals that have a geometric series. The geometric coefficient in this classifier can change once (to its inverse) to optimize the class ranges.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于计算类间隔的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>自然间歇 （Jenks） - 自然间歇类基于数据中固有的自然分组。将确定最好地对相似值进行分组并最大化类之间差异的类间隔。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>分位数—每个类将包含相同数量的要素。分位数分类非常适合线性分布数据。</bullet_item><para/>
        ///     <bullet_item>相等间隔—属性值的范围将划分为大小相等的子范围。这允许您指定间隔数，ArcGIS Pro 将根据值范围自动确定分班符。</bullet_item><para/>
        ///     <bullet_item>几何间隔—将基于具有几何序列的类间隔创建类间隔。此分类器中的几何系数可以更改一次（与其倒数相反）以优化类范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Classification Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _classification_method_value _classification_method { get; set; }

        public enum _classification_method_value
        {
            /// <summary>
            /// <para>Natural Breaks (Jenks)</para>
            /// <para>Natural Breaks (Jenks)—Natural breaks classes are based on natural groupings inherent in the data. Class breaks that best group similar values and that maximize the differences between classes will be identified. This is the default.</para>
            /// <para>自然间歇 （Jenks） - 自然间歇类基于数据中固有的自然分组。将确定最好地对相似值进行分组并最大化类之间差异的类间隔。这是默认设置。</para>
            /// </summary>
            [Description("Natural Breaks (Jenks)")]
            [GPEnumValue("NATURAL_BREAKS")]
            _NATURAL_BREAKS,

            /// <summary>
            /// <para>Quantile</para>
            /// <para>Quantile—Each class will contain an equal number of features. A quantile classification is well suited to linearly distributed data.</para>
            /// <para>分位数—每个类将包含相同数量的要素。分位数分类非常适合线性分布数据。</para>
            /// </summary>
            [Description("Quantile")]
            [GPEnumValue("QUANTILE")]
            _QUANTILE,

            /// <summary>
            /// <para>Equal Interval</para>
            /// <para>Equal Interval—The range of attribute values will be divided into equal-sized subranges. This allows you to specify the number of intervals, and ArcGIS Pro will automatically determine the class breaks based on the value range.</para>
            /// <para>相等间隔—属性值的范围将划分为大小相等的子范围。这允许您指定间隔数，ArcGIS Pro 将根据值范围自动确定分班符。</para>
            /// </summary>
            [Description("Equal Interval")]
            [GPEnumValue("EQUAL_INTERVAL")]
            _EQUAL_INTERVAL,

            /// <summary>
            /// <para>Geometric Interval</para>
            /// <para>Geometric Interval—Class breaks will be created based on class intervals that have a geometric series. The geometric coefficient in this classifier can change once (to its inverse) to optimize the class ranges.</para>
            /// <para>几何间隔—将基于具有几何序列的类间隔创建类间隔。此分类器中的几何系数可以更改一次（与其倒数相反）以优化类范围。</para>
            /// </summary>
            [Description("Geometric Interval")]
            [GPEnumValue("GEOMETRIC_INTERVAL")]
            _GEOMETRIC_INTERVAL,

        }

        /// <summary>
        /// <para>Number of Classes</para>
        /// <para>The number of data classification breaks that will appear on the map. The default value is 5.</para>
        /// <para>将显示在地图上的数据分类中断数。默认值为 5。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Classes")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _number_of_classes { get; set; }


        /// <summary>
        /// <para>Output Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_layer { get; set; }


        public ColorCodedLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}